package kr.saeildamil.androidstudy.ch07;

import kr.saeildamil.androidstudy.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.Toast;

public class ToastLayoutEx extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch07_toastlayout);
		
		findViewById(R.id.toastlayout_btn).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				LinearLayout toastlayout = (LinearLayout) View.inflate(ToastLayoutEx.this, R.layout.toastview, null);
				Toast t = new Toast(ToastLayoutEx.this);
				t.setView(toastlayout);
				t.show();
				
			}
		});
	}
}
